package cn.itcast.wanxinp2p.consumer.service;

import cn.itcast.wanxinp2p.api.account.model.comsumer.ConsumerDTO;
import cn.itcast.wanxinp2p.api.account.model.comsumer.ConsumerRegisterDTO;
import cn.itcast.wanxinp2p.api.consumer.model.ConsumerRequest;
import cn.itcast.wanxinp2p.api.depository.model.DepositoryConsumerResponse;
import cn.itcast.wanxinp2p.api.depository.model.GatewayRequest;
import cn.itcast.wanxinp2p.common.domain.RestResponse;

public interface ConsumerService  {
    /**
    * 检测用户是否存在
    * @param mobile
    * @return
    */
    Integer checkMobile(String mobile);
    /**
    * 用户注册
    * @param consumerRegisterDTO
    * @return
    */
    void register(ConsumerRegisterDTO consumerRegisterDTO);


    /**
     生成开户数据
     @param consumerRequest
     @return
     */
    RestResponse<GatewayRequest> createConsumer(ConsumerRequest consumerRequest);


    /**
     * 获取用户开户数据
     * @param mobile
     * @return
     */
    ConsumerDTO getConsumer(String mobile);

    /**
     * 更新开户结果
     * @param response
     * @return
     */
    Boolean modifyResult(DepositoryConsumerResponse response);
}